<div class="block {{ edit ? 'vbedit' : 'vbview' }}">
  <div class="toolbar">
    <div class="lblank"></div>
    <div class="lsj"></div>
    <div class="edit-option">
      <button (click)="showEdit()">编辑</button>
      <button (click)="showView()">展示</button>
      <button (click)="save()">保存</button>
    </div>
  </div>

  <markdown-block
    *ngIf="block && block.type == 1"
    [value]="block.body"
    [edit]="edit"
  ></markdown-block>
  <code-block
    *ngIf="block && block.type == 2"
    [value]="block.body"
    [settings]="block.settings"
    [edit]="edit"
  ></code-block>
  <katex-block
    *ngIf="block && block.type == 3"
    [value]="block.body"
    [edit]="edit"
  ></katex-block>
  <table-block
    *ngIf="block && block.type == 4"
    [value]="block.body"
    [edit]="edit"
  ></table-block>
  <html-block
    *ngIf="block && block.type == 5"
    [value]="block.body"
    [edit]="edit"
  ></html-block>
</div>
